//
//  ReSetController.m
//  NoNameAmazing
//
//  Created by liuyang on 2017/9/11.
//  Copyright © 2017年 北京执行力科技有限公司. All rights reserved.
//

#import "ReSetController.h"

@interface ReSetController ()

@end

@implementation ReSetController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.reSetField.text = self.restr;
    self.navigationItem.rightBarButtonItem = [UIBarButtonItem barButtonTitle:@"确定" image:nil frame:CGRectMake(0, 0, 30, 20) target:self sel:@selector(sureClick)];
    self.view.backgroundColor = UIColorFromRGB(0xEFEFF5);
}

-(void)sureClick
{
    if ([self.reStr isEqualToString:@"NCYXM"]) {
        //创建字典
        NSDictionary *dict = @{@"xm":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"NCYXM" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"CYGZDW"]) {
        //创建字典
        NSDictionary *dict = @{@"gzdw":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"CYGZDW" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"DH"]) {
        //创建字典
        NSDictionary *dict = @{@"dh":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"DH" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"HKSZD"]) {
        //创建字典
        NSDictionary *dict = @{@"hkszd":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"HKSZD" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"JTZZ"]) {
        //创建字典
        NSDictionary *dict = @{@"jtzz":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"JTZZ" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"JTRK"]) {
        //创建字典
        NSDictionary *dict = @{@"jtrk":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"JTRK" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"JTNSR"]) {
        //创建字典
        NSDictionary *dict = @{@"jtnsr":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"JTNSR" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"JTZYSRLY"]) {
        //创建字典
        NSDictionary *dict = @{@"jtzysrly":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"JTZYSRLY" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"JTDH"]) {
        //创建字典
        NSDictionary *dict = @{@"jtdh":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"JTDH" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"JTYZBM"]) {
        //创建字典
        NSDictionary *dict = @{@"jtyzbm":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"JTYZBM" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"NJRSR"]) {
        //创建字典
        NSDictionary *dict = @{@"njrsr":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"NJRSR" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"YDDH"]) {
        //创建字典
        NSDictionary *dict = @{@"yddh":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"YDDH" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"TXDZ"]) {
        //创建字典
        NSDictionary *dict = @{@"txdz":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"TXDZ" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"DZXX"]) {
        //创建字典
        NSDictionary *dict = @{@"dzxx":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"DZXX" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"身份证"]) {
        //创建字典
        NSDictionary *dict = @{@"sfz":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"SFZ" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"银行卡号"]) {
        //创建字典
        NSDictionary *dict = @{@"yhkh":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"YHKH" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }else if ([self.reStr isEqualToString:@"联系电话"]) {
        //创建字典
        NSDictionary *dict = @{@"lxdh":self.reSetField.text};
        //发送通知
        [[NSNotificationCenter defaultCenter]postNotificationName:@"LXDH" object:nil userInfo:dict];
        [self.navigationController popViewControllerAnimated:YES];
    }
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}


@end
